﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace Prsrp
{
    /// <summary>
    /// BaseObject is the base class for any object in the game.
    /// </summary>
    /// <remarks>
    /// Warning: All children class of BaseAsset must override thoses functions:
    /// . Update() : Update the state machine of the asset. (you can acces GameTime with "Game.Instance.GameTime")
    /// </remarks>
    public class BaseAsset : BasePhysic
    {
        #region ITimable Members

        protected double mdLastTimeStamp = 0;

        protected double EnabledTime()
        {
            return (Game.Engine.GameTime.TotalGameTime.TotalMilliseconds - mdLastTimeStamp);
        }

        protected void ResetTimer()
        {
            mdLastTimeStamp = Game.Engine.GameTime.TotalGameTime.TotalMilliseconds;
        }

        #endregion
    }
}
